<?php

require_once("config.php");

class CookieProvider
{
	static public function getValue($name)
	{
		if(CookieProvider::cookieExist($name))
			return $_COOKIE[$name];
		else
			return "undefined";
	}
	
	static public function addCookie($name,
									 $value,
									 $expire = 0)
	{
		setcookie($name, $value, $expire);
	}
	 
	static public function removeCookie($name)
 	{
 		setcookie($name, "null", time() - 1);
 	}
 	 
 	static public function cookieExist($name)
 	{
 		return isset($_COOKIE[$name]);
 	}
}

?>